﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="organization_unit_dept.aspx.cs" Inherits="EDP.Application.Web.Organization.organization_unit_dept" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <style type="text/css">
        .x-column-header {
            text-align: center;
        }
    </style>
    <form id="form1" runat="server">
        <f:PageManager ID="PageManager" AutoSizePanelID="panel" runat="server" />
        <f:HiddenField ID="tb_fullCode" runat="server" BindName="FullCode" />
        <f:HiddenField ID="tb_parentId" runat="server" BindName="ParentId" />
        <f:HiddenField ID="tb_positionIds" runat="server" />
        <f:HiddenField ID="tb_positionNames" runat="server" />
        <f:HiddenField ID="tb_Lead" runat="server" BindName="LeadPositionId" />
        <f:HiddenField ID="tb_Assistant" runat="server" BindName="AssistantPositionId" />
        <f:HiddenField ID="hide_itemId" runat="server" BindName="ID" />
        <f:Panel ID="panel" Margin="0" BodyPadding="0" runat="server" ShowBorder="false" ShowHeader="false" AutoScroll="true" Layout="Region">
            <Items>
                <f:SimpleForm ID="form_content" runat="server" ShowBorder="false" ShowHeader="false" BodyPadding="10"
                    AutoScroll="false" Margin="0" LabelAlign="Right" LabelWidth="60" ValidateRequestMode="Enabled" RegionPosition="Left" Width="700" Layout="Column">
                    <Items>
                        <f:TextBox ID="tb_name" runat="server" Label="部门名称" BindName="Name" Margin="0" ColumnWidth="50%" ShowRedStar="true" />
                        <f:TextBox ID="tb_numbers" runat="server" Label="部门编号" BindName="Numbers" Margin="0 0 0 10" ColumnWidth="50%" ShowRedStar="true" EmptyText="2-20位字母,数字,下划线,横线" />
                        <f:TextBox ID="tb_shortName" runat="server" Label="部门简称" BindName="ShortName" Margin="10 0 0 0" ColumnWidth="50%" />
                        <f:TextBox ID="tb_englishName" runat="server" Label="英文名称" BindName="EnglishName" Margin="10 0 0 10" ColumnWidth="50%" />
                        <f:TriggerBox ID="trb_parent" runat="server" Label="上级组织" BindName="ParentName" Margin="10 0 0 0" ColumnWidth="50%" ShowRedStar="true" EnableEdit="false" TriggerIcon="Search" AutoPostBack="false" />
                        <f:DropDownList ID="ddl_type" runat="server" Label="部门类型" BindName="OrganizationTypeId" Margin="10 0 0 10" ColumnWidth="50%" ShowRedStar="true"
                            AutoPostBack="true" OnSelectedIndexChanged="ddl_type_SelectedIndexChanged" />
                        <f:DropDownList ID="ddl_lead" runat="server" Label="负责人" BindName="LeadPositionId" Margin="10 0 0 0" ColumnWidth="50%"
                            AutoPostBack="true" OnSelectedIndexChanged="ddl_lead_SelectedIndexChanged" />
                        <f:DropDownList ID="ddl_assistant" runat="server" Label="助理" BindName="AssistantPositionId" Margin="10 0 0 10" ColumnWidth="50%"
                            AutoPostBack="true" OnSelectedIndexChanged="ddl_assistant_SelectedIndexChanged" />
                        <f:DropDownList ID="ddl_province" runat="server" Label="所在地" BindName="ProvinceId" Margin="10 0 0 0" ColumnWidth="28%"
                            AutoPostBack="true" OnSelectedIndexChanged="ddl_province_SelectedIndexChanged" />
                        <f:DropDownList ID="ddl_city" runat="server" BindName="CityId" Margin="10 0 0 5" ColumnWidth="20%"
                            AutoPostBack="true" OnSelectedIndexChanged="ddl_city_SelectedIndexChanged" />
                        <f:DropDownList ID="ddl_area" runat="server" BindName="AreaId" Margin="10 0 0 5" ColumnWidth="20%"
                            AutoPostBack="true" OnSelectedIndexChanged="ddl_area_SelectedIndexChanged" />
                        <f:DropDownList ID="ddl_street" runat="server" BindName="StreetId" Margin="10 0 0 5" ColumnWidth="32%" />
                        <f:CheckBox ID="cb_IsIndependent" runat="server" Label="独立部门" BindName="IsIndependent" Margin="10 0 0 0" ColumnWidth="50%" />
                        <f:TriggerBox ID="trb_point" runat="server" Label="经纬度" BindName="Point" Margin="10 0 0 10" ColumnWidth="50%"
                            EnableEdit="true" TriggerIcon="Search" AutoPostBack="false" OnTriggerClick="trb_point_TriggerClick" />
                        <f:TextBox ID="tb_address" runat="server" Label="详细地址" BindName="Address" Margin="10 0 0 0" ColumnWidth="100%" />
                        <f:TextBox ID="tb_Phone" runat="server" Label="联系电话" BindName="Phone" Margin="10 0 0 0" ColumnWidth="50%" />
                        <f:TextBox ID="tb_Contacter" runat="server" Label="联系人" BindName="Contacter" Margin="10 0 0 10" ColumnWidth="50%" />
                        <f:TextBox ID="tb_createUser" runat="server" Label="创建人" BindName="CreateUserName" Margin="10 0 0 0" ColumnWidth="50%" Readonly="true" />
                        <f:TextBox ID="tb_craeteTime" runat="server" Label="创建时间" BindName="CreateTimeDisplay" Margin="10 0 0 10" ColumnWidth="50%" Readonly="true" />
                        <f:TextBox ID="tb_modifyUser" runat="server" Label="修改人" BindName="ModifyUserName" Margin="10 0 0 0" ColumnWidth="50%" Readonly="true" />
                        <f:TextBox ID="tb_modifyTime" runat="server" Label="修改时间" BindName="ModifyTimeDisplay" Margin="10 0 0 10" ColumnWidth="50%" Readonly="true" />
                        <f:TextArea ID="tb_remark" runat="server" Label="描述" BindName="Remarks" Margin="10 0 0 0" ColumnWidth="100%" Height="163" />
                    </Items>
                </f:SimpleForm>
                <f:Grid ID="grid_position" runat="server" Title="职务列表" ShowHeader="false" RegionPosition="Center" Margin="10 10 0 0"
                    DataKeyNames="ID,PositionId,PositionName,PositionTitle,PersonCount,PositionTypeName" AllowSorting="false" AllowPaging="false" OnRowCommand="grid_List_RowCommand" AllowCellEditing="true"
                    OnPreRowDataBound="grid_position_PreRowDataBound">
                    <Toolbars>
                        <f:Toolbar runat="server" ToolbarAlign="Right">
                            <Items>
                                <f:Button ID="btn_position_add" runat="server" Text="添加职位编制" Icon="Add" Margin="0 10 0 0" EnablePostBack="false" />
                            </Items>
                        </f:Toolbar>
                    </Toolbars>
                    <Columns>
                        <f:BoundField DataField="PositionTypeName" Width="100" HeaderText="职类" />
                        <f:BoundField DataField="PositionName" Width="100" HeaderText="职务名称" />
                        <f:RenderField DataField="PositionTitle" ExpandUnusedSpace="true" FieldType="String" HeaderText="职位名称">
                            <Editor>
                                <f:TextBox ID="tb_PositionNickName" runat="server" />
                            </Editor>
                        </f:RenderField>
                        <f:RenderField DataField="PersonCount" Width="80" FieldType="Int" HeaderText="人数">
                            <Editor>
                                <f:NumberBox ID="tb_PersonCount" runat="server" MaxLength="6" />
                            </Editor>
                        </f:RenderField>
                        <f:LinkButtonField ColumnID="lb_permission" Width="30" CommandName="permission" CommandTitle="设置权限" ToolTip="设置权限" Icon="ApplicationKey" TextAlign="center" />
                        <f:LinkButtonField ColumnID="lb_delete" Width="30" CommandName="delete" CommandTitle="删除职务" ToolTip="删除" Icon="Delete" TextAlign="center" />
                    </Columns>
                </f:Grid>
            </Items>
            <Toolbars>
                <f:Toolbar runat="server" Position="Bottom" ToolbarAlign="Right">
                    <Items>
                        <f:Button ID="btn_save_close" runat="server" Text=" 保 存 " Icon="Disk" Margin="0 10 0 0" ValidateForms="form_content" OnClick="btn_save_close_Click" />
                        <f:Button ID="btn_close" runat="server" Text=" 关 闭 " Icon="Cross" Margin="0 10 0 0" EnablePostBack="false" EnablePermission="false" />
                    </Items>
                </f:Toolbar>
            </Toolbars>
        </f:Panel>
        <f:Window ID="win_map" runat="server" Target="Parent" Width="600" Height="600" />
        <f:Window ID="win_parent" Target="Parent" runat="server" />
        <f:Window ID="win_posi" runat="server" Target="Parent" OnClose="win_posi_Close" />
        <f:Window ID="win_permission" runat="server" Target="Parent" />
    </form>
</body>
</html>
